home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / spellt_1 / FORM1.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-02-10  |  3.6 KB  |  107 lines

  1. VERSION 5.00
  2. Object = "{E22CCE1C-B7AC-11D1-A1C2-444553540000}#13.3#0"; "ChadoSpellText.ocx"
  3. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  4. Begin VB.Form Form1 
  5.    Caption         =   "SpellText Sample Program"
  6.    ClientHeight    =   7755
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   5985
  10.    BeginProperty Font 
  11.       Name            =   "Arial"
  12.       Size            =   11.25
  13.       Charset         =   0
  14.       Weight          =   400
  15.       Underline       =   0   'False
  16.       Italic          =   0   'False
  17.       Strikethrough   =   0   'False
  18.    EndProperty
  19.    Icon            =   "Form1.frx":0000
  20.    LinkTopic       =   "Form1"
  21.    ScaleHeight     =   7755
  22.    ScaleWidth      =   5985
  23.    StartUpPosition =   2  'CenterScreen
  24.    Begin MSComDlg.CommonDialog cmdlg 
  25.       Left            =   5280
  26.       Top             =   240
  27.       _ExtentX        =   847
  28.       _ExtentY        =   847
  29.       _Version        =   393216
  30.    End
  31.    Begin ChadoSpellText.SpellText SpellText1 
  32.       Height          =   1815
  33.       Left            =   480
  34.       TabIndex        =   2
  35.       Top             =   840
  36.       Width           =   3915
  37.       _ExtentX        =   6906
  38.       _ExtentY        =   3201
  39.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  40.          Name            =   "MS Serif"
  41.          Size            =   9.75
  42.          Charset         =   0
  43.          Weight          =   400
  44.          Underline       =   0   'False
  45.          Italic          =   0   'False
  46.          Strikethrough   =   0   'False
  47.       EndProperty
  48.       FontName        =   "MS Serif"
  49.       FontSize        =   9.75
  50.       Text            =   ""
  51.       CustomDictionaryFName=   "\CHCUSTOM.CUD"
  52.       CheckOnFocusLoss=   0   'False
  53.       MSForeColor     =   255
  54.       MSBackColor     =   16777215
  55.       SquiggleColor   =   255
  56.    End
  57.    Begin VB.CommandButton butFont 
  58.       Caption         =   "Change Font"
  59.       Height          =   375
  60.       Left            =   2400
  61.       TabIndex        =   1
  62.       Top             =   60
  63.       Width           =   1935
  64.    End
  65.    Begin VB.CommandButton butMain 
  66.       Caption         =   "Switch Style"
  67.       Height          =   375
  68.       Left            =   240
  69.       TabIndex        =   0
  70.       Top             =   60
  71.       Width           =   1935
  72.    End
  73. Attribute VB_Name = "Form1"
  74. Attribute VB_GlobalNameSpace = False
  75. Attribute VB_Creatable = False
  76. Attribute VB_PredeclaredId = True
  77. Attribute VB_Exposed = False
  78. Option Explicit
  79. Private Sub butFont_Click()
  80.     cmdlg.FontBold = SpellText1.FontBold
  81.     cmdlg.FontItalic = SpellText1.FontItalic
  82.     cmdlg.FontName = SpellText1.FontName
  83.     cmdlg.FontSize = SpellText1.FontSize
  84.     cmdlg.FontStrikethru = SpellText1.FontStrikethru
  85.     cmdlg.FontUnderline = SpellText1.FontUnderline
  86.     cmdlg.Flags = cdlCFBoth
  87.     cmdlg.ShowFont
  88.     SpellText1.FontBold = cmdlg.FontBold
  89.     SpellText1.FontItalic = cmdlg.FontItalic
  90.     SpellText1.FontName = cmdlg.FontName
  91.     SpellText1.FontSize = cmdlg.FontSize
  92.     SpellText1.FontStrikethru = cmdlg.FontStrikethru
  93.     SpellText1.FontUnderline = cmdlg.FontUnderline
  94. End Sub
  95. Private Sub butMain_Click()
  96.     If SpellText1.Style = MultiLine Then
  97.         SpellText1.Style = SingleLine
  98.     Else
  99.         SpellText1.Style = MultiLine
  100.     End If
  101. End Sub
  102. Private Sub Form_Resize()
  103.     butMain.Move 0, 0
  104.     butFont.Move butMain.Width + 100, 0
  105.     If Me.ScaleHeight > butMain.Height Then SpellText1.Move 0, butMain.Height, Me.ScaleWidth, Me.ScaleHeight - butMain.Height
  106. End Sub
  107.